<template>
  <div>
    <a-card
      style="width: 100%"
      :active-tab-key="titleKey"
      :tab-list="tabListNoTitle"
      :bordered="false"
      class="br-10"
      @tabChange="key => onTabChange(key)"
    >
      <template v-if="titleKey === 'resource'">
        <ActivityResourcesConfig></ActivityResourcesConfig>
      </template>
      <template v-else-if="titleKey === 'cooperation'">
        <ActivityCooperateConfig></ActivityCooperateConfig>
      </template>
    </a-card>
  </div>
</template>

<script>
import { checkPermission } from '@/utils/authority'
import ActivityCooperateConfig from './ActivityCooperateConfig.vue'
import ActivityResourcesConfig from './ActivityResourcesConfig.vue'
export default {
  components: {
    ActivityCooperateConfig,
    ActivityResourcesConfig
  },
  data() {
    return {
      titleKey: 'resource',
      tabListNoTitle: []
    }
  },
  computed: {
    isChecked() {
      return this.isOpen === 0
    }
  },
  created() {
    this.tabListNoTitle.push({
      tab: '资源平台配置',
      key: 'resource'
    })

    this.tabListNoTitle.push({
      tab: '跨界合作配置',
      key: 'cooperation'
    })

    this.titleKey = this.tabListNoTitle[0].key
  },
  methods: {
    onTabChange(key) {
      this.titleKey = key
    }
  }
}
</script>

<style lang="less" scoped>
.card-view {
  background-color: #f7f8fa;
}
.tips {
  color: rgb(108, 108, 108);
  font-size: 14px;
}
</style>
